<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
     <script>


        class People 
        {
            constructor(name,height,weight)
            {
                this.name = name;
                this.height = height;
                this.weight = weight;
            }
            Say() {
                console.log("hello");
            }
            static other = "other";
            static sum ()
            {return 100;}
        }
        // let p1 = new People("小米",168,50);
        // console.log(p1);
        // p1.Say();
        // p1.sum();
        // console.log(People.other);
        // console.log(People.sum());
        
         class Student extends People {
            constructor(name,height,weight,number)
            {
                super(name,height,weight); //调用父类构造
                this.number  = number;
            }
            //重写
            Say() {
                alert(this.name);
            }
         }

     </script>
</body>
</html>